#ifndef __SPI_SH1106_H__
#define __SPI_SH1106_H__

#include <linux/spi/spi.h>
#include <linux/cdev.h>
#include <linux/of.h> 		  // 设备树 
#include <linux/mutex.h>
#include <linux/device.h>
#include <linux/fs.h>
#include <uapi/linux/ioctl.h>

#define NAME      "spi_sh1106"
#define DEV_NUM   (1)

#define CMD      (0x0)
#define DATA     (0x1)

struct sh1106_cdev
{
    struct cdev cdev;
    dev_t devno;
    struct class* sh1106_class;
	struct device* sh1106_device;
    struct device_node* node;
    int rst_pin;  // 复位引脚
    int dc_pin;   // 数据命令控制引脚
    struct mutex mutex;
    struct spi_device* spi;
};





#endif // __SPI_SH1106_H__